package cn.huiyunche.base.service.interfaces;

import cn.huiyunche.base.service.form.DVehicleClassifyForm;
import cn.huiyunche.base.service.interfaces.query.DVehicleClassifyQueryConditions;
import cn.huiyunche.base.service.model.DVehicleClassify;
import cn.huiyunche.base.service.vo.PageVo;
import org.springframework.validation.BindingResult;

import java.util.List;
import java.util.Map;

/**
 * The interface D vehicle classify service.
 *
 * @FileName: cn.huiyunche.driver.service
 * @Description: 运单车型分类
 * @author: Aaron
 * @date: 2017 /3/2 下午8:12
 */
public interface DVehicleClassifyService {

    /**
     * Select by fuel type id list.
     *
     * @param fuelTypeId the fuel type id
     * @return the list
     * @throws Exception the exception
     */
    List<DVehicleClassify> selectByFuelTypeId(Integer fuelTypeId) throws Exception;

    /**
     * Add long.
     *
     * @param form the form
     * @param br   the br
     * @return the long
     * @throws Exception the exception
     */
    Integer add(DVehicleClassifyForm form, BindingResult br) throws Exception;

    /**
     * Select by primary id b vehicle type.
     *
     * @param id the id
     * @return the b vehicle type
     * @throws Exception the exception
     */
    DVehicleClassify selectByPrimaryId(Integer id) throws Exception;

    /**
     * Update long.
     *
     * @param form the form
     * @param br   the br
     * @return the long
     * @throws Exception the exception
     */
    Integer update(DVehicleClassifyForm form, BindingResult br) throws Exception;

    /**
     * Select list by conditions map.
     *
     * @param pageVo     the page vo
     * @param conditions the conditions
     * @return the map
     * @throws Exception the exception
     */
    Map<String, Object> selectListByConditions(PageVo pageVo, DVehicleClassifyQueryConditions conditions) throws Exception;

    /**
     * Select by type code list.
     *
     * @param id                  the id
     * @param vehicleClassifyName the vehicle classify name
     * @param vehicleClassifyId   the vehicle classify id
     * @return the list
     * @throws Exception the exception
     */
    void verificationClassifyIdOrClassifyNameUnique(Integer id, String vehicleClassifyName, Integer vehicleClassifyId) throws Exception;

    /**
     * Enable Or Disabled
     *
     * @param id               the id
     * @param enableOrDisabled the enable or disabled
     * @return int int
     */
    int enableOrDisabled(Integer id, Boolean enableOrDisabled);

    /**
     * Select by vehicle classify id d vehicle classify.
     *
     * @param vehicleClassifyId the vehicle classify id
     * @return the d vehicle classify
     */
    DVehicleClassify selectByVehicleClassifyId(Integer vehicleClassifyId);

    /**
     * Del.
     *
     * @param id the id
     * @throws Exception the exception
     */
    void del(Integer id) throws Exception;

    /**
     * 根据分类名称查询
     * @param vehicleClassifyName
     * @return
     */
    List<DVehicleClassify> findByName(String vehicleClassifyName);

    /**
     * 根据分类名称模糊查询车型
     * @param vehicleClassifyName
     * @return
     */
    List<DVehicleClassify> findVehicleClassify(String vehicleClassifyName);
}
